@if(count($topics))
    <ul class="list-group">
        @foreach($topics as $topic)
            <li class="list-group-item border-start-0 border-end-0
             @if($loop->first)
             border-top-0
             @endif
             d-flex justify-content-between align-items-center">
                <div class="flex-grow-1 d-flex justify-content-start align-items-center">
                    <a href="{{route('users.show',[$topic->user_id])}}" class="flex-shrink-0">
                        <img class="img-thumbnail" src="{{$topic->user->avatar}}" alt="{{$topic->user->name}}" width="50">
                    </a>
                    <div class="px-3 d-flex flex-column justify-content-center">
                        <a class="text-decoration-none text-success" href="{{$topic->link()}}">{{$topic->title}}</a>
                        <small class="text-secondary mt-1">
                            <a href="{{route('categories.show',$topic->category_id)}}" class="text-decoration-none text-secondary">
                                <i class="fa fa-solid fa-location-dot"></i>
                            {{$topic->category->name }}
                            </a>
                            <span> • </span>
                            <a href="#" class="text-decoration-none text-secondary">
                                <i class="fa fa-regular fa-user"></i>
                                {{$topic->user->name }}
                            </a>
                            <span> • </span>
                            <i class="fa fa-clock"></i>
                            <span title="最后活跃时间：{{$topic->created_at}}">{{$topic->created_at->diffForHumans()}}</span>
                        </small>
                    </div>
                </div>
                <div>
                    <span class="badge rounded-pill text-bg-secondary">0</span>
                </div>
            </li>
        @endforeach
    </ul>
@else
    <div class="text-center text-secondary">暂无数据 -_-!</div>
@endif
